import Vue from 'vue';
import Router from 'vue-router';
import column from 'components/column/column'
import funnel from 'components/funnel/funnel'
import heat from 'components/heat/heat'
import point from 'components/point/point'
import line from 'components/line/line'
import dashboard from 'components/dashboard/dashboard'
import multipleColumn from 'components/multipleColumn/multipleColumn'

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/readme',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            children:[
                {
                    path: '/',
                    component: resolve => require(['../components/page/Readme.vue'], resolve)
                },
                {
                    path: '/basetable',
                    component: resolve => require(['../components/page/BaseTable.vue'], resolve)
                },
                {
                    path: '/vuetable',
                    component: resolve => require(['../components/page/VueTable.vue'], resolve)     // vue-datasource组件
                },
                {
                    path: '/baseform',
                    component: resolve => require(['../components/page/BaseForm.vue'], resolve)
                },
                {
                    path: '/vueeditor',
                    component: resolve => require(['../components/page/VueEditor.vue'], resolve)    // Vue-Quill-Editor组件
                },
                {
                    path: '/markdown',
                    component: resolve => require(['../components/page/Markdown.vue'], resolve)     // Vue-Quill-Editor组件
                },
                {
                    path: '/money',
                    component: resolve => require(['../components/chart/GetMon.vue'], resolve)
                },
                {
                    path: '/data',
                    component: resolve => require(['../components/chart/bigdata.vue'], resolve)
                },
                {
                    path: '/trades',
                    component: resolve => require(['../components/chart/trades.vue'], resolve)
                },
                {
                    path: '/upload',
                    component: resolve => require(['../components/page/Upload.vue'], resolve)       // Vue-Core-Image-Upload组件
                },
                {
                    path: '/basecharts',
                    component: resolve => require(['../components/page/BaseCharts.vue'], resolve)   // vue-schart组件
                },
                {
                    path: '/drag',
                    component: resolve => require(['../components/page/DragList.vue'], resolve)    // 拖拽列表组件
                },
                {
                    path: '/btable',
                    component: resolve => require(['../components/page/App1.vue'], resolve)
                },
                {
                    path: '/test',
                    component: resolve => require(['../components/page/SelectTest.vue'], resolve)
                },
                {
                    path: '/chart',
                    component: resolve => require(['../components/page/chart.vue'], resolve)
                },
                {
                    path: '/table',
                    component: resolve => require(['../components/page/table.vue'], resolve)
                },
                {
                    path: '/Map',
                    component: resolve => require(['../components/chart/chart.vue'], resolve)
                },
                {
                    path: '/mapChart',
                    component: resolve => require(['../components/chart/mapChart.vue'], resolve)
                },
                {
                    path: '/China',
                    component: resolve => require(['../components/chart/map.vue'], resolve)
                },
                {
                    path: '/search',
                    component: resolve => require(['../components/chart/searchTop.vue'], resolve)
                },
                {
                    path: '/getwx',
                    component: resolve => require(['../components/chart/GetWx.vue'], resolve)
                },
                {
                    path: '/point',
                    component: resolve => require(['../components/chart/china.vue'], resolve)
                }, {
                    path: '/funnel',
                    component: funnel
                }, {
                    path: '/heat',
                    component: heat
                }, {
                    path: '/point',
                    component: point
                }, {
                    path: '/dashboard',
                    component: dashboard
                }, {
                    path: '/multipleColumn',
                    component: multipleColumn
                }, {
                    path: '/line',
                    component: line
                }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        }
    ],
    linkActiveClass: 'active'
})
